<!--
 * @Description: 梯度任务用户领取列表
 * @Author: Li Yujie
 * @Date: 2021/05/15
 * @Last Modified by: Li Yujie
 * @Last Modified time: 2021/05/15
-->
<template>
    <div class="wrapper">
        <div class="content-wrapper">
            <!-- 筛选-->
            <div class="filter-view">
                <div class="filter-item">
                    <el-radio-group
                        v-model="filterData.submit_type"
                        size="medium"
                        @change="handleChangeEventType"
                    >
                        <el-radio-button :label="101">拉新事件</el-radio-button>
                        <el-radio-button :label="2">推广事件</el-radio-button>
                    </el-radio-group>
                </div>
                <div class="filter-item">
                    <p class="filter-item__title">
                        用户编号/手机号
                    </p>
                    <el-input
                        placeholder="请输入用户编号或者手机号"
                        v-model="filterData.student_keyword"
                        suffix-icon="el-icon-search"
                        clearable
                        size="medium"
                        @keydown.enter.native="getTableData(1)"
                    />
                </div>
                <div class="filter-item">
                    <p class="filter-item__title">
                        学校名称
                    </p>
                    <el-cascader
                        v-model="filterData.school_name"
                        placeholder="请选择学校"
                        :options="school_tree"
                        filterable
                        clearable
                        size="medium"
                        expand-trigger="click"
                        @change="getTableData(1)"
                        @keyup.native.enter="getTableData(1)"
                        :props="{
                            label: 'name',
                            value: 'name',
                            children: 'children',
                            emitPath: false
                        }"
                    />
                </div>
                <div class="filter-item">
                    <p class="filter-item__title">
                        任务名称
                    </p>
                    <el-input
                        placeholder="请输入任务名称"
                        v-model="filterData.task_keyword"
                        suffix-icon="el-icon-search"
                        clearable
                        size="medium"
                        @keydown.enter.native="getTableData(1)"
                    />
                </div>
                <!--拉新事件任务状态-->
                <div
                    class="filter-item"
                    v-if="filterData.submit_type === 101"
                >
                    <p class="filter-item__title">
                        任务状态
                    </p>
                    <el-select
                        v-model="filterData.status"
                        filterable
                        placeholder="全部"
                        size="medium"
                        style="width: 152px"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in statusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <!--推广事件任务状态-->
                <div
                    class="filter-item"
                    v-if="filterData.submit_type === 2"
                >
                    <p class="filter-item__title">
                        任务状态
                    </p>
                    <el-select
                        v-model="filterData.verify_status"
                        filterable
                        placeholder="全部"
                        size="medium"
                        style="width: 152px"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in verifyStatusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="filter-item">
                    <p class="filter-item__title">
                        报名时间
                    </p>
                    <el-date-picker
                        v-model="dateTimeRange"
                        type="datetimerange"
                        range-separator="-"
                        start-placeholder="开始日期"
                        end-placeholder="结束日期"
                        :default-time="['00:00:00', '23:59:59']"
                        size="medium"
                        style="width: 360px"
                        value-format="timestamp"
                    />
                </div>
                <!--奖励状态-->
                <div
                    class="filter-item"
                    v-if="filterData.submit_type === 2"
                >
                    <p class="filter-item__title">
                        奖励状态
                    </p>
                    <el-select
                        v-model="filterData.award_status"
                        filterable
                        placeholder="全部"
                        size="medium"
                        style="width: 152px"
                        @change="getTableData(1)"
                    >
                        <el-option
                            v-for="item in awardStatusList"
                            :key="item.value"
                            :label="item.label"
                            :value="item.value"
                        />
                    </el-select>
                </div>
                <div class="filter-item">
                    <el-button
                        type="primary"
                        size="small"
                        class="query-button"
                        @click="getTableData(1)"
                    >
                        查询
                    </el-button>
                    <el-button
                        type="primary"
                        size="medium"
                        @click="handleExport()"
                    >
                        数据导出
                    </el-button>
                </div>
            </div>
            <!--筛选-->

            <!-- table -->
            <el-table
                :data="tableData"
                height="100%"
                style="width: 100%;"
                :cell-style="{height: '106px'}"
                ref="table"
                class="data-table"
                v-loading="tableLoading"
            >
                <el-table-column
                    label="序号"
                    align="center"
                    width="60"
                    type="index"
                    fixed="left"
                    key="0"
                />
                <el-table-column
                    label="用户信息"
                    width="200"
                    fixed="left"
                    key="1"
                >
                    <template slot-scope="scope">
                        <div class="cell-title">{{ scope.row.true_name ? scope.row.true_name : '--' }}</div>
                        <div class="cell-tips">手机号：{{ scope.row.phone }}</div>
                        <div
                            class="cell-tips"
                            v-if="scope.row.agent_level !== -1">
                            精英等级：{{ scope.row.agent_level > -1 ? `E${scope.row.agent_level}` : '--' }}
                        </div>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="school_name"
                    label="学校名称"
                    show-overflow-tooltip
                    align="left"
                    width="140"
                    :formatter="emptyFormatter"
                    key="2"
                />
                <el-table-column
                    label="任务信息"
                    width="200"
                    key="3"
                >
                    <template slot-scope="scope">
                        <div class="cell-title">{{ scope.row.task_title }}</div>
                        <div class="cell-tips">任务ID：{{ scope.row.task_no }}</div>
                    </template>
                </el-table-column>
                <el-table-column
                    label="奖励设置"
                    align="center"
                    key="4"
                >
                    <template slot-scope="scope">
                        <el-popover
                            placement="bottom"
                            width="640"
                            trigger="click"
                        >
                            <div style="text-align: center;margin: 12px 0 24px;font-size: 16px">查看奖励设置</div>
                            <el-table :data="scope.row.award_config">
                                <el-table-column
                                    width="150"
                                    label="梯度等级"
                                    align="center"
                                >
                                    <template slot-scope="scope">
                                        梯度{{ scope.$index + 1 }}
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    property="require_submit_count"
                                    label="要求数量"
                                    align="center"
                                />
                                <el-table-column
                                    label="奖励类型"
                                    align="center"
                                >
                                    <template slot-scope="scope">
                                        {{ scope.row.type === 1 ? '现金奖励' : '0元购学生券' }}
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    label="奖励金额/数量"
                                    align="center"
                                    width="130"
                                >
                                    <template slot-scope="scope">
                                        {{ scope.row.total_num }}{{ scope.row.type === 1 ? '元' : '张' }}
                                    </template>
                                </el-table-column>
                                <el-table-column
                                    label="用户端显示金额"
                                    align="center"
                                    width="130"
                                >
                                    <template slot-scope="scope">
                                        <div v-if="scope.row.type === 1">{{ scope.row.num }}元</div>
                                        <div v-else>--</div>
                                    </template>
                                </el-table-column>
                            </el-table>
                            <el-button
                                slot="reference"
                                type="text"
                            >查看</el-button>
                        </el-popover>
                    </template>
                </el-table-column>
                <el-table-column
                    label="报名时间"
                    width="160"
                    key="5"
                >
                    <template slot-scope="scope">
                        {{ scope.row.create_time * 1000 | dateFormatter('yyyy/MM/dd HH:mm:ss') }}
                    </template>
                </el-table-column>
                <el-table-column
                    label="任务状态"
                    align="center"
                    key="6"
                    v-if="filterData.submit_type === 101"
                >
                    <template slot-scope="scope">
                        <div class="status-wrapper">
                            <div
                                :class="['status-dot', scope.row.status === 0 ? 'warning' : (scope.row.status === 1 ? 'success' : 'danger')]"/>
                            <div>{{ scope.row.status | statusFilter }}</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column
                    label="任务状态"
                    width="146"
                    key="x"
                    v-if="filterData.submit_type === 2"
                >
                    <template slot-scope="scope">
                        <div
                            class="status-wrapper"
                            style="justify-content: flex-start"
                        >
                            <div
                                :class="['status-dot', scope.row.verify_status === 0 ? 'warning' : (scope.row.verify_status === 1 ? 'success' : scope.row.verify_status === -1 ? 'danger' : 'normal')]"/>
                            <div>{{ scope.row.verify_status | verifyStatusFilter }}</div>
                            <el-button
                                type="text"
                                v-if="scope.row.verify_status === -1"
                                @click="showReason(scope.row.verify_fail_reason)"
                            >
                                (查看原因)
                            </el-button>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column
                    label="奖励状态"
                    align="center"
                    width="110"
                    key="7"
                >
                    <template slot-scope="scope">
                        <div class="status-wrapper">
                            <div
                                :class="['status-dot', scope.row.award_status === 1 ? 'success' : scope.row.award_status === -1 ? 'danger' : 'normal']"/>
                            <div>{{ scope.row.award_status === 1 ? '已发放' : scope.row.award_status === -1 ? '拒绝发放' : '未发放' }}</div>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column
                    prop="finish_count"
                    label="完成数量"
                    show-overflow-tooltip
                    align="center"
                    :formatter="emptyFormatter"
                    key="8"
                    v-if="filterData.submit_type === 101"
                />
                <el-table-column
                    label="奖励类型"
                    show-overflow-tooltip
                    align="center"
                    key="9"
                >
                    <template slot-scope="scope">
                        {{ scope.row.award_type === 1 ? '现金奖励' : '0元购学生券' }}
                    </template>
                </el-table-column>
                <el-table-column
                    label="奖励金额/数量"
                    show-overflow-tooltip
                    width="130"
                    align="center"
                    key="10"
                >
                    <template slot-scope="scope">
                        {{ scope.row.award_count }}{{ scope.row.award_type === 1 ? '元' : '张' }}
                    </template>
                </el-table-column>
                <el-table-column
                    label="是否自动发放"
                    width="130"
                    align="center"
                    key="11"
                    v-if="filterData.submit_type === 101"
                >
                    <template slot-scope="scope">
                        {{ scope.row.auto_award ? '是' : '否' }}
                    </template>
                </el-table-column>
                <el-table-column
                    prop="verify_admin_true_name"
                    label="操作人"
                    show-overflow-tooltip
                    align="center"
                    :formatter="emptyFormatter"
                    key="12"
                />
                <el-table-column
                    prop="remark"
                    label="备注"
                    show-overflow-tooltip
                    align="center"
                    :formatter="emptyFormatter"
                    key="13"
                />
                <el-table-column
                    label="操作"
                    align="left"
                    :width="filterData.submit_type === 101 ? 160 : 120"
                    fixed="right"
                    key="14"
                >
                    <template slot-scope="scope">
                        <div class="option-btn-group">
                            <template v-if="filterData.submit_type === 101">
                                <el-button
                                    type="text"
                                    :disabled="(scope.row.auto_award && scope.row.status === 1) || (scope.row.auto_award === 0 && scope.row.award_status === 0)"
                                    @click="showVerifyDialog(1, scope.row)"
                                >
                                    发放奖励
                                </el-button>
                                <el-button
                                    type="text"
                                    :disabled="(scope.row.auto_award && scope.row.status === 1) || (scope.row.auto_award === 0 && scope.row.award_status === 0)"
                                    @click="showVerifyDialog(-1, scope.row)"
                                >
                                    不发奖励
                                </el-button>
                            </template>
                            <template v-else>
                                <el-button
                                    type="text"
                                    v-if="scope.row.verify_status !== 2"
                                    @click="handleSetAward(scope.row)"
                                >
                                    {{ scope.row.verify_status === 0 ? '审核' : '查看' }}
                                </el-button>
                            </template>
                            <el-button
                                type="text"
                                @click="showRemarkDialog(scope.row)"
                            >
                                备注
                            </el-button>
                        </div>
                    </template>
                </el-table-column>
            </el-table>
            <!-- /table -->

            <!-- /分页 -->
            <div class="pagination-wrapper clearfix">
                <el-pagination
                    layout="total, prev, pager, next, jumper"
                    background
                    :current-page.sync="page.now_page"
                    :total="page.total_count"
                    :page-size="page.page_size"
                    @current-change="getTableData"
                />
            </div>
        </div>
        <!-- 发放奖励 -->
        <grant-gradient-award-dialog
            ref="grantAward"
            @confirm="handleVerify(apply_no, 1, '', $event)"
        />
        <!-- 图片预览 -->
        <img-preview ref="preview"/>
    </div>
</template>

<script>
import { back } from '@/mixin/back';
import imgPreview from '@/components/common/img-preview';
import GrantGradientAwardDialog from "@/components/elite-task/grant-gradient-award";
import {verifyDialog} from "@/components/elite-task/grant-gradient-award-verify";

export default {
    name: 'GradientTaskReceiveList',
    mixins: [back],
    components: {
        GrantGradientAwardDialog,
        imgPreview
    },
    data() {
        return {
            filterData: {
                task_category: 4,
                // 101拉新事件 2推广引流事件
                submit_type: 101,
                // 用户信息
                student_keyword: '',
                // 任务名称
                task_keyword: '',
                // 学校名称
                school_name: '',
                // 拉新事件任务状态
                status: 99,
                // 推广引流事件状态
                verify_status: 99,
                // 奖励发放状态
                award_status: 99,
                // 申请时间
                start_time: '',
                end_time: '',
            },
            tableData: [],
            tableLoading: false,
            page: {
                now_page: 1,
                total_count: 0,
                page_size: 20
            },
            dateTimeRange: [],
            // 审核类型
            statusList: [
                {label: '全部', value: 99},
                {label: '已完成', value: 1},
                {label: '进行中', value: 0},
                {label: '未完成', value: -1},
            ],
            verifyStatusList: [
                {label: '全部', value: 99},
                {label: '待审核', value: 0},
                {label: '已通过', value: 1},
                {label: '待提交', value: 2},
                {label: '未通过', value: -1},
                {label: '已放弃', value: -2},
            ],
            awardStatusList: [
                {label: '全部', value: 99},
                {label: '已发放', value: 1},
                {label: '未发放', value: 0},
                {label: '拒绝发放', value: -1},
            ],
            // 操作用户的id
            apply_no: '',
            task_no: '',
            rejectType: 0,
            authResult: {},
            school_tree: []
        };
    },
    computed: {},
    watch: {
        dateTimeRange(value) {
            this.filterData.start_time = value ? value[0] / 1000 : '';
            this.filterData.end_time = value ? value[1] / 1000 : '';
            this.getTableData(1);
        }
    },
    filters: {
        statusFilter(val) {
            switch (val) {
                case 0:
                    return '进行中';
                case 1:
                    return '已完成';
                case -1:
                    return '未完成';
                case -2:
                    return '已放弃';
                default:
                    return '--';
            }
        },
        verifyStatusFilter(val) {
            switch (val) {
                case 0:
                    return '待审核';
                case 1:
                    return '已通过';
                case 2:
                    return '待提交';
                case -1:
                    return '未通过';
                case -2:
                    return '已放弃';
                case -3:
                    return '已终止';
                default:
                    return '--';
            }
        }
    },

    mounted() {
        this.authResult = this.$route.meta.authResult;
        this.filterData.task_keyword = this.$route.query.task_no ? this.$route.query.task_no : '';
        this.filterData.submit_type = this.$route.query.submit_type ? Number(this.$route.query.submit_type) : 101;
        this.getTableData();
        this.getSchoolTree();
    },

    methods: {

        /**
         * @description 获取省/市/学校三级联动
         */
        getSchoolTree () {
            this.$post('/student/local_info%5Cschool_tree',{},resp => {
                if (resp.code === 1) {
                    this.school_tree = resp.data.tree;
                }
            });
        },

        /**
         * @description 获取列表数据
         * @param page
         */
        getTableData(page) {
            this.tableLoading = true;
            let params = { ...this.filterData };

            params.page_id = page || this.page.now_page;
            this.$post('/student/task_stuagent_student_task%5Cstep_task_list', params, res => {
                if (res.code === 1) {
                    this.tableData = res.data.list;
                    this.page = res.data.page;
                } else {
                    this.$notify({
                        title: '提示',
                        message: res.msg,
                        type: 'warning'
                    });
                }
                this.tableLoading = false;
            });
        },

        /**
         * @description 过滤函数
         */
        emptyFormatter(row, column, val) {
            if (!val) return '--';
            return val;
        },

        /**
         * 显示审核操作弹窗
         * @param action -1拒绝 1 通过
         * @param row
         */
        async showVerifyDialog(action, row) {
            this.apply_no = row.apply_no;
            this.task_no = row.task_no;
            // 通过
            if (action === 1) {
                // 进行中
                if(row.status === 0) {
                    let data = await this.getDetail(row.apply_no);

                    this.$refs.grantAward.show(data);
                } else {
                    this.$confirm('确认发放奖励吗?', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(() => {
                        this.handleVerify(row.apply_no, action);
                    }).catch(() => {});
                }
            } else {
                let reason = await this.$zdPrompt({
                    title: '审核不通过',
                    message: '未完成原因',
                    placeholder: '请输入未完成原因…'
                });

                if(reason) {
                    this.rejectType = row.status;
                    this.handleVerify(row.apply_no, action, reason);
                }
            }
        },

        /**
         * 审核
         * @param apply_no
         * @param verify_status
         * @param verify_fail_reason
         * @param sub_ids - 选择的任务
         */
        handleVerify(apply_no, verify_status, verify_fail_reason, sub_ids) {
            let params = {
                apply_no,
                verify_status,
                verify_fail_reason,
                sub_ids,
                task_no: this.task_no
            };
            let url = '';

            if(sub_ids || (this.rejectType === 0 && verify_status === -1)) {
                url = '/student/task_stuagent_student_task%5Ccomplete_task_set_award';
            } else {
                url = '/student/task_stuagent_student_task%5Cset_task_award';
            }

            this.$post(url, params, resp => {
                if (resp.code === 1) {
                    this.$notify({
                        title: '提示',
                        message: '操作成功',
                        duration: 2000,
                        type: 'success'
                    });
                    this.getTableData();
                } else {
                    this.$notify({
                        title: '提示',
                        message: resp.msg,
                        duration: 2000,
                        type: 'warning'
                    });
                }
            });
        },

        /**
         * 备注
         * @param row
         */
        async showRemarkDialog(row) {
            let value = await this.$zdPrompt({
                title: '备注',
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                defaultValue: row.remark
            });

            if(value) {
                let params = {
                    apply_no: row.apply_no,
                    remark: value
                };

                this.$post('/student/task_stuagent_student_task%5Cset_remark', params, resp => {
                    if (resp.code === 1) {
                        this.$notify({
                            title: '提示',
                            message: '操作成功',
                            duration: 2000,
                            type: 'success'
                        });
                        this.getTableData();
                    } else {
                        this.$notify({
                            title: '提示',
                            message: resp.msg,
                            duration: 2000,
                            type: 'warning'
                        });
                    }
                });
            }
        },

        /**
         * 预览图片
         * @param   {String}    images      //单图预览
         * @param   {Array}     images      //多图预览
         * @param index
         */
        fnShowPreview(images, index) {
            if (images && Object.prototype.toString.call(images) == '[object String]') {
                this.$refs.preview.show([
                    images
                ]);
            } else if (images && Object.prototype.toString.call(images) == '[object Array]') {
                this.$refs.preview.show(images, index);
            } else {
                this.$message({
                    type: 'warning',
                    message: '图片类型错误'
                });
            }
        },

        /**
         * 路由跳转
         * @param routeName
         * @param query
         */
        handleRoute(routeName, query) {
            this.$router.push({
                name: routeName,
                query
            });
        },

        /**
         * 获取详情
         * @param apply_no
         * @returns {Promise<unknown>}
         */
        getDetail(apply_no) {
            this.dialogLoading = true;
            return new Promise(resolve => {
                this.$post('/student/task_stuagent_student_task%5Cget_verify_detail', {apply_no}, resp => {
                    if (resp.code === 1) {
                        resolve(resp.data);
                    } else {
                        this.$notify({
                            title: '提示',
                            message: resp.msg,
                            duration: 2000,
                            type: 'warning'
                        });
                    }
                    this.dialogLoading = false;
                });
            });
        },

        /**
         * 显示驳回原因
         * @param reason
         */
        showReason(reason) {
            if(!reason) {
                this.$message.warning('驳回原因为空');
                return;
            }
            this.$zdPrompt({
                title: '审核未通过',
                showText: reason
            });
        },

        /**
         * 审核发放奖励
         * @param row
         * @param type
         */
        async handleSetAward(row, type) {
            let formData = await this.getDetail(row.apply_no);
            let result = await verifyDialog({
                formData,
                type: row.verify_status ? 2 : 1,
                status: row.verify_status
            });

            if(result) this.getTableData();
        },

        /**
         * 切换任务事件
         * @param e
         */
        handleChangeEventType(e) {
            if(e === 101) this.filterData.task_keyword = '';
            this.filterData.verify_status = 99;
            this.filterData.award_status = 99;
            this.filterData.status = 99;
            this.getTableData(1);
        },

        /**
         * 导出数据
         */
        handleExport() {
            if(!this.authResult.auth_export) {
                this.$notify({
                    title: '提示',
                    message: '请联系管理员添加权限',
                    type: 'warning',
                    duration: 2000
                });
                return false;
            }
            let base = this.$baseUrl;
            let params = {...this.filterData};
            let ticket = localStorage.getItem('sessionTicket');
            let queryStr = Object.keys(params)
                .map(key => `${key}=${params[key]}`)
                .join('&');
            let url = `${base}/student/task_stuagent_student_task%5Cexport_step_task_report_list?${queryStr}&__ticket=${ticket}`;

            window.open(url);
        },
    }
};
</script>

<style lang="less" scoped>
.wrapper {
    width: 100%;
    flex: 1;

    .content-wrapper {
        display: flex;
        height: calc(100% - 24px);
        flex-direction: column;
        position: relative;
        padding: 0 24px;
        background: #fff;
        box-sizing: border-box;

        /*header*/

        .header {
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #F0F2F5;

            .header-title {
                color: #333333;
                font-size: 20px;
                height: 20px;
                font-weight: 500;
                position: relative;
                margin-left: 12px;
                margin-bottom: 24px;

                &::before {
                    content: '';
                    position: absolute;
                    left: -8px;
                    top: -1px;
                    width: 3px;
                    height: 20px;
                    background: #1890FF;
                }
            }
        }

        /*筛选*/

        .filter-view {
            margin-top: 12px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            flex-wrap: wrap;

            .filter-item {
                display: flex;
                align-items: center;
                font-family: PingFangSC-Regular, PingFang SC;
                font-weight: 400;
                color: #333333;
                white-space: nowrap;
                margin-right: 24px;
                margin-bottom: 12px;

                &__title {
                    margin-right: 16px;
                    white-space: nowrap;
                }
            }

            .input-with-select {
                width: 300px;
                margin-right: 32px;
            }

            /deep/ .input-with-select .el-input-group__prepend {
                background-color: #fff;
                width: 130px;
            }
            .query-button {
                width: 84px;
                height: 36px;
                background: #FFFFFF;
                border-radius: 4px;
                border: 1px solid #1890FF;
                font-size: 14px;
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #1890FF;
                margin-right: 12px;
            }
        }

        .data-table {
            ::-webkit-scrollbar {
                width: 6px;
                height: 6px;
            }
            .cell-title {
                font-family: PingFangSC-Medium, PingFang SC;
                font-weight: 500;
                color: #333333;
                margin-bottom: 12px;
                display: -webkit-box;
                -webkit-box-orient: vertical;
                overflow: hidden;
                -webkit-line-clamp: 2;
            }
            .cell-content {
                display: -webkit-box;
                -webkit-box-orient: vertical;
                overflow: hidden;
                -webkit-line-clamp: 3;
            }
            .cell-tips {
                color: #999;
            }
            // 操作按钮
            .option-btn-group {
                .el-button {
                    margin-left: 0;
                    margin-right: 10px;
                }
            }
            .status-wrapper {
                display: flex;
                align-items: center;
                justify-content: center;

                .status-dot {
                    width: 6px;
                    height: 6px;
                    border-radius: 50%;
                    margin-right: 5px;

                    &.success {
                        background: #4CD964;
                    }

                    &.danger {
                        background: #FF3030;
                    }

                    &.warning {
                        background: #FFA72D;
                    }

                    &.normal {
                        background: #C2C2C2;
                    }
                }
            }
        }

        /* 分页 */

        .pagination-wrapper {
            padding-top: 10px;
            .el-pagination {
                float: right;
                padding: 0;
                background-color: transparent;
            }
        }
    }
    .info-dialog-wrapper {
        padding: 3px 22px;
        /deep/ .el-form-item {
            margin-bottom: 0;
        }
        /deep/ .el-form-item__content {
            line-height: 30px;
            margin-top: 6px;
        }
        .close-btn {
            width: 120px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 50%;
            transform: translateX(-50%);
            margin-top: 24px;
        }
    }
    /deep/ .el-dialog__header {
        padding-top: 10px;
        box-shadow:0 1px 0 0 rgba(233,233,233,1);
        display: flex;
        align-items: center;
        background: #FAFAFA;
        border-radius: 4px 4px 0 0;
        .el-dialog__title {
            font-weight: 500;
            color: #333;
            font-size: 14px;
        }
        .el-icon-close:before {
            color: rgb(194,194,194);
            font-size: 17px;
            font-weight: bold;
        }
        .el-dialog__headerbtn {
            top: 14px;
        }
    }
    /deep/ .el-table__fixed-right {
        right: 6px!important;
    }
    /deep/ .el-dialog__footer {
        text-align: center;
    }
    /deep/ .el-textarea__inner {
        resize: none;
    }
    /deep/ .el-radio-button {
        &.is-active {
            .el-radio-button__inner {
                background: #E6F1FC;
                color: #20A0FF;
                border-color: #20A0FF;
            }
        }
        .el-radio-button__inner {
            padding: 10px 24px;
        }
    }
}
</style>

